package cn.codergege.springmvc.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.codergege.springmvc.dao.DepartmentMapper;
import cn.codergege.springmvc.model.Department;
import cn.codergege.springmvc.service.DepartmentService;

@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {
	private final Logger log = LoggerFactory.getLogger(DepartmentServiceImpl.class);
	@Autowired
	private DepartmentMapper departmentMapper;


	@Override
	public List<Department> getAll() throws Exception {
		log.info("----> getting all departments");
		return departmentMapper.getAll();
	}

}
